<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>店铺激励规则管理</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
		<link rel="stylesheet" href="../../layuiadmin/style/public.css" media="all">
		<!-- 图标库 -->
		<link rel="stylesheet" href="../../layuiadmin/font-awesome/css/font-awesome.min.css" />
		<script src="../../layuiadmin/modules/jquery.min.js"></script>
	</head>
	<body>
		<div class="layui-fluid" id="LAY-component-grid-list">
			<div class="layui-card">
				<div class="layui-card-body">
					<!-- 搜索条件start -->
					<form class="layui-form meberMangement" action="">
						<div class="layui-row demo-list">
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg2dot4">
								<div class="layui-form-item">
									<label class="layui-form-label">激励规则ID</label>
									<div class="layui-input-block">
										<input type="text" autocomplete="off" placeholder="精确搜索" class="layui-input">
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg2dot4">
								<div class="layui-form-item">
									<label class="layui-form-label">店铺机构类型</label>
									<div class="layui-input-block">
										<select>
											<option value=""></option>
											<option value="">全部</option>
											<option value="0">1</option>
											<option value="1">2</option>
										</select>
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg2dot4">
								<div class="layui-form-item" style="margin-bottom: 0;">
									<label class="layui-form-label" style="padding: 0;">配置自定义商品类型</label>
									<div class="layui-input-block">
										<select>
											<option value=""></option>
											<option value="">全部</option>
											<option value="0">1</option>
											<option value="1">2</option>
										</select>
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg2dot4">
								<div class="layui-form-item">
									<label class="layui-form-label">当前审核状态</label>
									<div class="layui-input-block">
										<select>
											<option value=""></option>
											<option value="">全部</option>
											<option value="0">1</option>
											<option value="1">2</option>
										</select>
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg2dot4">
								<div class="layui-form-item">
									<label class="layui-form-label">广告类型</label>
									<div class="layui-input-block">
										<select>
											<option value=""></option>
											<option value="">全部</option>
											<option value="0">1</option>
											<option value="1">2</option>
										</select>
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg2dot4">
								<div class="layui-form-item">
									<label class="layui-form-label">规则名称</label>
									<div class="layui-input-block">
										<input type="text" autocomplete="off" placeholder="模糊搜索" class="layui-input">
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg2dot4">
								<div class="layui-form-item">
									<label class="layui-form-label">激励类型</label>
									<div class="layui-input-block">
										<select>
											<option value=""></option>
											<option value="">全部</option>
											<option value="0">1</option>
											<option value="1">2</option>
										</select>
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg2dot4">
								<div class="layui-form-item">
									<label class="layui-form-label">自定义分类名称</label>
									<div class="layui-input-block">
										<input type="text" autocomplete="off" placeholder="模糊搜索" class="layui-input">
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg2dot4">
								<div class="layui-form-item">
									<label class="layui-form-label">审核人</label>
									<div class="layui-input-block">
										<input type="text" autocomplete="off" placeholder="模糊搜索" class="layui-input">
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg2dot4">
								<div class="layui-form-item">
									<label class="layui-form-label">创建人</label>
									<div class="layui-input-block">
										<input type="text" autocomplete="off" placeholder="模糊搜索" class="layui-input">
									</div>
								</div>
							</div>
							<div class="layui-col-sm6 layui-col-md6 layui-col-lg12" style="justify-content: flex-end;display: flex;">
								<div class="layui-btn-container">
									<button type="button" class="layui-btn">清空搜索</button>
									<button type="button" class="layui-btn">导出</button>
									<button type="button" class="layui-btn" style="margin-right: 0;">搜索</button>
								</div>
							</div>
						</div>
					</form>
					<!-- 搜索条件end -->
					<!-- tab标签start -->
					<div class="layui-tab" llay-filter="custom-tab">
						<div style="justify-content:space-between;display: flex;">
							<ul class="layui-tab-title" style="border-bottom: none;">
								<li class="layui-this">
									全部
								</li>
								<li>
									待审核
								</li>
								<li>
									审核通过
								</li>
								<li>
									审核不通过
								</li>
							</ul>

							<div class="layui-btn-container">
								<button type="button" class="layui-btn" style="margin:0;" id="addRule-btn">新增激励规则</button>
							</div>

						</div>
						<div class="layui-tab-content" style="padding: 0;">
							<div class="layui-tab-item layui-show">
								<!-- 全部start -->
								<div class="layui-table-meber">
									<table id="allMember" lay-filter="allMember" class="layui-table" lay-skin="nob" style="margin: 0;"></table>
								</div>
								<!-- 全部end -->

								<!-- 激励规则信息start -->
								<script type="text/html" id="webchatMsg">
									<div>
										<div class="meberId">激励规则ID：IR1000010008</div>
										<div class="list-data">
											<p>规则名称：</p>
											<p>规则描述：</p>
										</div>
									  </div>
								</script>
								<!-- 激励规则信息end -->
								<!-- 店铺信息start -->
								<script type="text/html" id="memberMsg">
									<div>
										<div class="meberId"></div>
										<div class="list-data">
											<p>应用店铺类型列表：</p>
											<p>自定义分类列表：</p>
										</div>
									  </div>
								</script>
								<!-- 店铺信息end -->
								<!-- 规则信息start -->
								<script type="text/html" id="registerMsg">
									<div class="table-barDemo">
									<div class="meberId"></div>
									<div class="list-data">
										<p>广告类型：</p>
										<p>配置自定义商品类型：自营配置</p>										
										<p>普通发票税点：</p>
										<p>增值税发票税点：</p>									
										<p>规则开始时间：</p>									
										<p>规则结束时间：</p>
									</div>
								  </div>
								</script>
								<!-- 规则信息end -->
								<!-- 状态信息start -->
								<script type="text/html" id="roleMsg">
									<div class="table-barDemo">
									<div class="meberId"></div>
									<div class="list-data">
										<p>当前审核状态：待审核</p>
										<p>资料更新重审状态：无</p>
										<p>创建人：</p>
										<p>创建时间：</p>
										<p>最后审核人：</p>
										<p>最后审核时间：</p>
									</div>
								  </div>
								</script>
								<!-- 状态信息end -->
								<!-- 操作start -->
								<script type="text/html" id="memberMsgOperate">
									<div class="table-barDemo">
									<div class="meberId"></div>
									  <a class="layui-btn layui-btn-sm" lay-event="log">日志</a>
									  <a class="layui-btn layui-btn-sm" lay-event="effect">启用</a>
									  <a class="layui-btn layui-btn-sm" lay-event="stopUse">禁用</a>
									  <a class="layui-btn layui-btn-sm" lay-event="edit">商品激励修改</a>
									  <a class="layui-btn layui-btn-sm" lay-event="editRule">编辑</a>
								  </div>
								</script>
								<!-- 操作end -->
							</div>

							<div class="layui-tab-item">
								<!-- 待审核start -->
								<div class="layui-table-meber">
									<table id="auditing" lay-filter="auditing" class="layui-table" lay-skin="nob" style="margin: 0;"></table>
								</div>
								<!-- 待审核end -->
								
								<!-- 激励规则信息start -->
								<script type="text/html" id="webchatMsg2">
									<div>
										<div class="meberId">激励规则ID：IR1000010008</div>
										<div class="list-data">
											<p>规则名称：</p>
											<p>规则描述：</p>
										</div>
									  </div>
								</script>
								<!-- 激励规则信息end -->
								<!-- 店铺信息start -->
								<script type="text/html" id="memberMsg2">
									<div>
										<div class="meberId"></div>
										<div class="list-data">
											<p>应用店铺类型列表：</p>
											<p>自定义分类列表：</p>
										</div>
									  </div>
								</script>
								<!-- 店铺信息end -->
								<!-- 规则信息start -->
								<script type="text/html" id="registerMsg2">
									<div class="table-barDemo">
									<div class="meberId"></div>
									<div class="list-data">
										<p>广告类型：</p>
										<p>配置自定义商品类型：自营配置</p>										
										<p>普通发票税点：</p>
										<p>增值税发票税点：</p>									
										<p>规则开始时间：</p>									
										<p>规则结束时间：</p>
									</div>
								  </div>
								</script>
								<!-- 规则信息end -->
								<!-- 状态信息start -->
								<script type="text/html" id="roleMsg2">
									<div class="table-barDemo">
									<div class="meberId"></div>
									<div class="list-data">
										<p>当前审核状态：待审核</p>
										<p>资料更新重审状态：无</p>
										<p>创建人：</p>
										<p>创建时间：</p>
										<p>最后审核人：</p>
										<p>最后审核时间：</p>
									</div>
								  </div>
								</script>
								<!-- 状态信息end -->
								<!-- 操作start -->
								<script type="text/html" id="memberMsgOperate2">
									<div class="table-barDemo">
									<div class="meberId"></div>
									  <a class="layui-btn layui-btn-sm" lay-event="audit">审核</a>
								  </div>
								</script>
								<!-- 操作end -->
							</div>
							<div class="layui-tab-item">
								<!-- 审核通过start -->
								<div class="layui-table-meber">
									<table id="passShop" lay-filter="passShop" class="layui-table" lay-skin="nob" style="margin: 0;"></table>
								</div>
								<!-- 审核通过end -->
								
								<!-- 激励规则信息start -->
								<script type="text/html" id="webchatMsg3">
									<div>
										<div class="meberId">激励规则ID：IR1000010008</div>
										<div class="list-data">
											<p>规则名称：</p>
											<p>规则描述：</p>
										</div>
									  </div>
								</script>
								<!-- 激励规则信息end -->
								<!-- 店铺信息start -->
								<script type="text/html" id="memberMsg3">
									<div>
										<div class="meberId"></div>
										<div class="list-data">
											<p>应用店铺类型列表：</p>
											<p>自定义分类列表：</p>
										</div>
									  </div>
								</script>
								<!-- 店铺信息end -->
								<!-- 规则信息start -->
								<script type="text/html" id="registerMsg3">
									<div class="table-barDemo">
									<div class="meberId"></div>
									<div class="list-data">
										<p>广告类型：</p>
										<p>配置自定义商品类型：自营配置</p>										
										<p>普通发票税点：</p>
										<p>增值税发票税点：</p>									
										<p>规则开始时间：</p>									
										<p>规则结束时间：</p>
									</div>
								  </div>
								</script>
								<!-- 规则信息end -->
								<!-- 状态信息start -->
								<script type="text/html" id="roleMsg3">
									<div class="table-barDemo">
									<div class="meberId"></div>
									<div class="list-data">
										<p>当前审核状态：审核通过</p>
										<p>资料更新重审状态：无</p>
										<p>创建人：</p>
										<p>创建时间：</p>
										<p>最后审核人：</p>
										<p>最后审核时间：</p>
									</div>
								  </div>
								</script>
								<!-- 状态信息end -->
								<!-- 操作start -->
								<script type="text/html" id="memberMsgOperate3">
									<div class="table-barDemo">
									<div class="meberId"></div>
									  <a class="layui-btn layui-btn-sm" lay-event="effect">启用</a>
									  <a class="layui-btn layui-btn-sm" lay-event="stopUse">禁用</a>
									  <a class="layui-btn layui-btn-sm" lay-event="edit">商品激励修改</a>
									  <a class="layui-btn layui-btn-sm" lay-event="editRule">编辑</a>
								  </div>
								</script>
								<!-- 操作end -->
							</div>
							<div class="layui-tab-item">
								<!-- 审核不通过start -->
								<div class="layui-table-meber">
									<table id="failedShop" lay-filter="failedShop" class="layui-table" lay-skin="nob" style="margin: 0;"></table>
								</div>
								<!-- 审核不通过end -->
								
								<!-- 激励规则信息start -->
								<script type="text/html" id="webchatMsg4">
									<div>
										<div class="meberId">激励规则ID：IR1000010008</div>
										<div class="list-data">
											<p>规则名称：</p>
											<p>规则描述：</p>
										</div>
									  </div>
								</script>
								<!-- 激励规则信息end -->
								<!-- 店铺信息start -->
								<script type="text/html" id="memberMsg4">
									<div>
										<div class="meberId"></div>
										<div class="list-data">
											<p>应用店铺类型列表：</p>
											<p>自定义分类列表：</p>
										</div>
									  </div>
								</script>
								<!-- 店铺信息end -->
								<!-- 规则信息start -->
								<script type="text/html" id="registerMsg4">
									<div class="table-barDemo">
									<div class="meberId"></div>
									<div class="list-data">
										<p>广告类型：</p>
										<p>配置自定义商品类型：自营配置</p>										
										<p>普通发票税点：</p>
										<p>增值税发票税点：</p>									
										<p>规则开始时间：</p>									
										<p>规则结束时间：</p>
									</div>
								  </div>
								</script>
								<!-- 规则信息end -->
								<!-- 状态信息start -->
								<script type="text/html" id="roleMsg4">
									<div class="table-barDemo">
									<div class="meberId"></div>
									<div class="list-data">
										<p>当前审核状态：审核不通过</p>
										<p>资料更新重审状态：无</p>
										<p>创建人：</p>
										<p>创建时间：</p>
										<p>最后审核人：</p>
										<p>最后审核时间：</p>
									</div>
								  </div>
								</script>
								<!-- 状态信息end -->
								<!-- 操作start -->
								<script type="text/html" id="memberMsgOperate4">
									<div class="table-barDemo">
									<div class="meberId"></div>
									  <a class="layui-btn layui-btn-sm" lay-event="edit">商品激励修改</a>
									  <a class="layui-btn layui-btn-sm" lay-event="editRule">编辑</a>
								  </div>
								</script>
								<!-- 操作end -->
							</div>
						</div>
					</div>
					<!-- tab标签end -->
				</div>
			</div>
		</div>
		<!-- 日志start -->
		<div class="log-box" id="log-box">
			<div class="layui-card">
				<div class="layui-card-body">
					<form class="layui-form" action="">
						<div class="layui-row demo-list">
							<div class="layui-col-sm10 layui-col-md10 layui-col-lg10">
								<div class="layui-form-item">
									<div class="layui-input-block" style="margin-left: 0;">
										<input type="text" class="layui-input" placeholder="关键字模糊搜索">
									</div>
								</div>
							</div>
							<div class="layui-col-sm2 layui-col-md2 layui-col-lg2" style="justify-content: flex-end;display: flex;">
								<div class="layui-btn-container">
									<button type="button" class="layui-btn" style="width:120px;">搜索</button>
								</div>
							</div>
						</div>
					</form>

					<table id="logTable" lay-filter="logTable" class="layui-table"></table>
				</div>
			</div>
		</div>
		<!-- 日志end -->
		
		<!-- 商品激励修改start -->
		<div class="edit-box" id="edit-box">
			<div class="layui-card">
				<div class="layui-card-body">
					<form class="layui-form" action="">
						<div class="layui-row demo-list">
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
								<div class="layui-form-item">
									<label class="layui-form-label">激励类型</label>
									<div class="layui-input-block">
										<div style="overflow: hidden;margin-bottom: 10px;">
											<div class="layui-input-inline" style="width: auto;">
												<input type="radio" name="incentive" value="0" title="所有商品统一激励规比例:">
											</div>
											<div class="layui-input-inline" style="width: auto;">
												<input type="text" class="layui-input">
											</div>
											<div class="layui-form-mid layui-word-aux">%</div>
										</div>
										<div style="overflow: hidden;margin-bottom: 10px;">
											<div class="layui-input-inline" style="width: auto;">
												<input type="radio" name="incentive" value="1" title="所有商品统一激励规一口价:">

											</div>
											<div class="layui-input-inline" style="width: auto;">
												<input type="text" class="layui-input">
											</div>
											<div class="layui-form-mid layui-word-aux">元</div>
										</div>
										<div style="overflow: hidden;margin-bottom: 10px;">
											<div class="layui-input-block" style="width: auto;margin-left:0;">
												<input type="radio" name="incentive" value="2" title="定义激励比例 注：不同商品，可以设置不同激励比例，不同激励一口价，不同推广价">
											</div>

											<div class="layui-input-block" style="margin-left: 0;">
												<div style="justify-content: space-between;display: flex;">
													<div style="flex:1;">
														<textarea placeholder="批量输入货品ID" class="layui-textarea"></textarea>
													</div>
													<div style="width:120px;display: flex;align-items:flex-end;">
														<button type="button" class="layui-btn" style="width:120px;margin-left: 10px;">批量查询</button>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
								<div class="layui-btn-container">
									<button type="button" class="layui-btn btn_scale">批量设置激励比例</button>
									<button type="button" class="layui-btn btn_price">批量设置激励一口价</button>
									<button type="button" class="layui-btn btn_delect">批量删除</button>
								</div>
							</div>
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
								<table id="goodsTable" lay-filter="goodsTable" class="layui-table"></table>
							</div>
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
								<div class="layui-btn-container" style="text-align: center;margin-top: 10px;">
									<button class="layui-btn">保存</button>
									<div class="layui-btn layui-btn-primary cancel-btn">取消</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- 商品激励修改end -->

		<!-- 批量设置激励比例start -->
		<div class="scale-box" id="scale-box">
			<div class="layui-card">
				<div class="layui-card-body">
					<form class="layui-form" action="">
						<div class="layui-row demo-list">
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
								<div class="layui-form-item">
									<label class="layui-form-label" style="padding: 0px 15px;">批量设置激励比例</label>
									<div class="layui-input-inline">
										<input type="text" class="layui-input">
									</div>
									<div class="layui-form-mid layui-word-aux">%</div>
								</div>
							</div>
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
								<div class="layui-btn-container" style="text-align: center;margin-top: 10px;">
									<button class="layui-btn">确定</button>
									<div class="layui-btn layui-btn-primary closeIndex-btn">取消</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- 批量设置激励比例end -->

		<!-- 批量设置激励一口价start -->
		<div class="price-box" id="price-box">
			<div class="layui-card">
				<div class="layui-card-body">
					<form class="layui-form" action="">
						<div class="layui-row demo-list">
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
								<div class="layui-form-item">
									<label class="layui-form-label" style="padding: 0px 15px;">批量设置激励一口价</label>
									<div class="layui-input-inline">
										<input type="text" class="layui-input">
									</div>
									<div class="layui-form-mid layui-word-aux">元</div>
								</div>
							</div>
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
								<div class="layui-btn-container" style="text-align: center;margin-top: 10px;">
									<button class="layui-btn">确定</button>
									<div class="layui-btn layui-btn-primary closeIndex-btn">取消</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- 批量设置激励一口价end -->

		<!-- 编辑激励规则start -->
		<div class="editRule-box" id="editRule-box">
			<div class="layui-card">
				<div class="layui-card-body">
					<form class="layui-form" action="">
						<div class="layui-row demo-list">
							<div class="layui-form-item" style="font-weight:bold;">
								<label class="layui-form-label" style="font-weight:bold;">激励规则ID</label>
								<div class="layui-input-block">
									<input type="text" class="layui-input" value="IR1000010008ID" readonly="true" style="border: none;">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">规则名称</label>
								<div class="layui-input-block">
									<input type="text" class="layui-input" placeholder="请输入规则名称">
								</div>
							</div>
							<div class="site-title">
								<fieldset>
									<legend><a name="blockquote">激励规则</a></legend>
								</fieldset>
							</div>

							<div class="layui-form-item">
								<label class="layui-form-label">激励规则有效期</label>
								<div class="layui-input-block">
									<div>
										<input type="radio" name="time" value="0" title="不设置有效期">
									</div>
									<div style="display: flex;">
										<div>
											<input type="radio" name="time" value="0">
										</div>
										<div style="flex: 1;">
											<div style="display: flex;justify-content: space-between;">
												<div style="flex:1;">
													<input type="text" class="layui-input" id="startTime" placeholder="开始时间">
												</div>
												<div style="margin-left: 10px;margin-right: 10px;display: flex;align-items: center;">
													--
												</div>
												<div style="flex:1;">
													<input type="text" class="layui-input" id="endTime" placeholder="结束时间">
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-form-label">选择合伙店铺</div>
								<div class="layui-input-block">
									<div style="display: flex;justify-content: space-between;">
										<div class="custom-selectShop">
											<select>
												<option value="">请选择</option>
												<option value="1">1</option>
												<option value="2">2</option>
											</select>
										</div>
										<div style="margin-left: 10px;margin-right: 10px;display: flex;align-items: center;">
											--
										</div>
										<div class="custom-selectShop">
											<input type="text" class="layui-input" placeholder="请选择" readonly id="shop">
											<div style="display: none;" id="shop-container">
												<div>
													<div class="layui-btn-container">
														<a class="layui-btn layui-btn-sm">全选</a>
														<a class="layui-btn layui-btn-sm">清空</a>
														<a class="layui-btn layui-btn-sm">反选</a>
													</div>

													<div>
														<div><input type="checkbox" name="shop" lay-skin="primary" title="莲藕互联网医院"></div>
														<div><input type="checkbox" name="shop" lay-skin="primary" title="阿康连锁"></div>
														<div><input type="checkbox" name="shop" lay-skin="primary" title="广州天河石牌村村医"></div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="layui-form-item layui-form-text">
								<label class="layui-form-label">已选店铺</label>
								<div class="layui-input-block">
									<div style="padding: 6px 10px;min-height: 100px; border:1px solid #e6e6e6;background-color: #fff;
    border-radius: 2px;">
										<span style="margin-right: 10px;">
											莲藕互联网医院 <i class="layui-icon layui-icon-close"></i>
										</span>

										<span style="margin-right: 10px;">
											莲藕互联网医院 <i class="layui-icon layui-icon-close"></i>
										</span>
									</div>
									<!-- <textarea class="layui-textarea"></textarea> -->
								</div>
							</div>
							<div class="layui-form-item layui-form-text">
								<label class="layui-form-label">规则描述</label>
								<div class="layui-input-block">
									<textarea class="layui-textarea" placeholder="请输入规则描述"></textarea>
								</div>
							</div>
							<div class="layui-form-item">
								<div style="display: flex;justify-content: space-between;">
									<div class="custom-selectType">
										<div class="custom-title">
											选择分类：
										</div>
										<div class="custom-content">
											<!-- 自定义分类start -->
											<div class="custom-classification">
												<ul>
													<li class="u-f u-fac">
														<span class="classification-btn" value="0">
															<i class="layui-icon layui-icon-triangle-d"></i>
															<i class="layui-icon layui-icon-triangle-r" style="display: none;"></i>
														</span>

														<input type="checkbox" name="classification1" lay-filter="classification1" title="" lay-skin="primary">
														自定义分类
													</li>
												</ul>
												<ul class="add-classification" id="add-classification">
													<li class="u-f u-fac" style="margin-bottom: 5px;">
														<input type="checkbox" name="classification1-item" lay-filter="classification1-item" title="热门" lay-skin="primary">

													</li>
													<li class="u-f u-fac" style="margin-bottom: 5px;">
														<input type="checkbox" name="classification1-item" lay-filter="classification1-item" title="" lay-skin="primary">
														<input type="text" onblur="_blur(this)" class="classification-input" />
													</li>
												</ul>
											</div>
											<!-- 自定义分类end -->

											<!-- 系统分类start -->
											<div class="custom-classification">
												<ul>
													<li class="u-f u-fac">
														<span class="classification-btn" value="0">
															<i class="layui-icon layui-icon-triangle-d"></i>
															<i class="layui-icon layui-icon-triangle-r" style="display: none;"></i>
														</span>

														<input type="checkbox" name="classification2" lay-filter="classification2" lay-skin="primary">
														系统分类
													</li>
												</ul>
												<ul class="add-classification" id="system-classification">
													<li class="u-f u-fac">
														<input type="checkbox" name="classification2-item" lay-filter="classification2-item" lay-skin="primary">
														肝胆科
													</li>
													<li class="u-f u-fac">
														<input type="checkbox" name="classification2-item" lay-filter="classification2-item" lay-skin="primary">
														肝胆科
													</li>
												</ul>
											</div>
										</div>
									</div>
									<div style="margin-left: 10px;margin-right: 10px;display: flex;align-items:center;">
										<a class="layui-btn layui-btn-sm">确认选择</a>
									</div>
									<div class="custom-selectType">
										<div class="custom-title" style="display: flex;justify-content: space-between;">
											<div>已选分类名称：</div>
											<div>
												<span>
													置顶
												</span>
												<span>
													排序
												</span>
											</div>
										</div>
										<div class="custom-content custom-content-list">
											<ul>
												<li>
													<div>男科</div>
													<div>
														<span style="margin-right: 36px;">
															<i class="fa fa-arrow-circle-o-up" aria-hidden="true"></i>
														</span>
														<span style="margin-right: 20px;">
															<i class="fa fa-bars" aria-hidden="true"></i>
														</span>
													</div>
												</li>
												<li>
													<div>男科</div>
													<div>
														<span style="margin-right: 36px;">
															<i class="fa fa-arrow-circle-o-up" aria-hidden="true"></i>
														</span>
														<span style="margin-right: 20px;">
															<i class="fa fa-bars" aria-hidden="true"></i>
														</span>
													</div>
												</li>
											</ul>
										</div>
									</div>
								</div>
							</div>


							<div class="layui-form-item">
								<div style="display: flex;justify-content: space-between;">
									<div class="custom-selectType custom-selectType2">
										<div class="custom-title">
											<div>选择自定义分类</div>
											<div>分类批量设置商品</div>
										</div>
										<div class="custom-content">
											<div>
												<div><input type="radio" name="type" value="0" title="自定义分类，单选"></div>
												<div><input type="radio" name="type" value="1" title="自定义分类"></div>
												<div><input type="radio" name="type" value="2" title="自定义分类"></div>
											</div>
											<div>
												<textarea placeholder="批量输入货品ID" class="layui-textarea" style="padding: 0;height: 240px;border: none;"></textarea></div>
										</div>
									</div>
									<div style="margin-left: 10px;margin-right: 10px;display: flex;align-items:center;">
										<a class="layui-btn layui-btn-sm">确认选择</a>
									</div>
									<div class="custom-selectType custom-selectType2">
										<div class="custom-title" style="display: flex;justify-content: space-between;">
											<div>分类</div>
											<div>
												已配置商品
											</div>
										</div>
										<div class="custom-content">
											<div>
												<div><input type="radio" name="type" value="0" title="自定义分类，单选"></div>
												<div><input type="radio" name="type" value="1" title="自定义分类"></div>
												<div><input type="radio" name="type" value="2" title="自定义分类"></div>
											</div>
											<div>
												<strong></strong>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="layui-form-item radio-item">
								<label class="layui-form-label" style="padding: 0 15px;">配置自定义分类商品</label>
								<div class="layui-input-block">
									<input type="radio" name="setGoods" value="0" title="自营配置">
									<input type="radio" name="setGoods" value="1" title="非自营配置">
								</div>
							</div>

							<div class="layui-form-item radio-item">
								<label class="layui-form-label">广告类型</label>
								<div class="layui-input-block">
									<input type="radio" name="advertisement" lay-filter="advertisement" value="0" title="非自营广告" checked>
									<input type="radio" name="advertisement" lay-filter="advertisement" value="1" title="自营广告">
								</div>
							</div>

							<!-- 自营广告start -->
							<div id="advertisement-table" class="layui-form-item" style="display: none;">
								<div class="layui-table-meber2">
									<table id="advertisement" lay-filter="advertisement" class="layui-table" lay-skin="nob"></table>
								</div>


								<!-- 操作start -->
								<script type="text/html" id="uploadOperate">
									<div class="table-barDemo">
									  <a class="layui-btn layui-btn-sm" lay-event="upload" style="">上传</a>
								  </div>
								</script>
								<!-- 操作end -->

							</div>

							<!-- 自营广告end -->

							<div class="layui-form-item">
								<label class="layui-form-label">发票税点</label>
								<div class="layui-input-block">
									<div style="overflow: hidden;margin-bottom: 10px;">
										<div class="layui-form-mid layui-word-aux">增值税发票税点</div>
										<div class="layui-input-inline" style="width: auto;">
											<input type="text" class="layui-input">
										</div>
										<div class="layui-form-mid layui-word-aux">%</div>
									</div>
									<div style="overflow: hidden;margin-bottom: 10px;">
										<div class="layui-form-mid layui-word-aux">普通发票税点</div>
										<div class="layui-input-inline" style="width: auto;">
											<input type="text" class="layui-input">
										</div>
									</div>
								</div>
							</div>
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
								<div class="layui-btn-container" style="text-align: center;margin-top: 10px;">
									<button class="layui-btn">确定</button>
									<div class="layui-btn layui-btn-primary closeIndex-btn">取消</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- 编辑激励规则end -->
		
		<!-- 审核start -->
		<div class="log-box" id="auditing-box">
			<div class="layui-card">
				<div class="layui-card-body">
					<form class="layui-form" action="">
						<div class="layui-row demo-list">
							<div class="layui-form-item" style="font-weight:bold;margin-bottom:0;">
								<label>规则ID:XXX</label>
							</div>
							<div class="layui-form-item" style="margin-bottom:0;">
								<label>规则名称:XXX</label>
							</div>
							<div class="layui-form-item" style="margin-bottom:0;">
								<label>激励规则有效期:XXX至XXX</label>
							</div>
							
							<div class="layui-form-item" style="margin-bottom:0;">
								<label>已选店铺:</label>
							</div>
							<div class="layui-form-item">
								<table id="shopTable" lay-filter="shopTable" class="layui-table"></table>
							</div>
		
							<div class="layui-form-item">
								<label>规则描述:xxx</label>
							</div>
		
							<div class="layui-form-item" style="margin-bottom:0;">
								<label>已选分类和商品:</label>
							</div>
							<div class="layui-form-item">
								<table id="typeTable" lay-filter="typeTable" class="layui-table"></table>
							</div>
		
							<div class="layui-form-item" style="margin-bottom:0;">
								<label>广告类型：自营广告</label>
							</div>
							<div class="layui-form-item">
								<table id="advertisementTable" lay-filter="advertisementTable" class="layui-table"></table>
							</div>
							<div class="layui-form-item" style="margin-bottom:0;">
								<label>发票税点:增值税发票税点：10%；普通发票税点：8%</label>
							</div>
							<div class="layui-form-item" style="margin-bottom:0;">
								<label><span style="font-weight: bold;">激励类型：</span>自定义激励比例。</label>
							</div>
							<div class="layui-form-item">
								<table id="excitationTable" lay-filter="excitationTable" class="layui-table"></table>
							</div>									
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
								<div style="text-align: center;">
									 <input type="checkbox" name="agree" lay-skin="primary" title="已阅读上述规则内容">
								</div>
								<div class="layui-btn-container" style="text-align: center;margin-top: 10px;">
									<button class="layui-btn">审核通过</button>
									<div class="layui-btn layui-btn-primary cancel-btn">审核不通过</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- 审核end -->
		<script src="../../layuiadmin/layui/layui.js"></script>

		<script>
			var form;
			// 自定义分类文本失去焦点事件
			function _blur(obj) {
				var length = $("#add-classification li").length;
				var index = $(obj).parents("li").index();
				var value = $(obj).val().trim();
				// 判断是否最后一个元素
				if ((length - 1 == index) && value != '') {
					// 新增文本框
					var html = ""
					html += '<li class="u-f u-fac" style="margin-bottom: 5px;">'
					html +=
						'<input type="checkbox" name="classification1-item" lay-filter="classification1-item" title="" lay-skin="primary">'
					html += '<input type="text" onblur="_blur(this)" class="classification-input" />'
					html += '</li>'
					$("#add-classification").append(html);
					// 新增后非全选
					$("input[type='checkbox'][name='classification1']").prop("checked", false);
					form ? form.render("checkbox") : null;
				}
				if ((length - 1 != index) && value == '') {
					$(obj).parents("li").remove();
					isState();
				}
			}

			// 判断自定义分类子元素是否全部勾选
			function isState() {
				var length = $("#add-classification li").length;
				var state = true;

				for (var i = 0; i < length; i++) {
					var checked = $("#add-classification li:eq(" + i + ") input[type='checkbox'][name='classification1-item']").prop(
						"checked");
					if (checked == false) {
						state = false;
					}
				}

				if (state == true) {
					// 全选
					$("input[type='checkbox'][name='classification1']").prop("checked", true);
					form ? form.render("checkbox") : null;
					return;
				} else {
					// 非全选
					$("input[type='checkbox'][name='classification1']").prop("checked", false);
					form ? form.render("checkbox") : null;
				}
			}

			// 判断系统分类子元素是否全部勾选
			function isState2() {
				var length = $("#system-classification li").length;
				var state = true;

				for (var i = 0; i < length; i++) {
					var checked = $("#system-classification li:eq(" + i + ") input[type='checkbox'][name='classification2-item']").prop(
						"checked");
					if (checked == false) {
						state = false;
					}
				}

				if (state == true) {
					// 全选
					$("input[type='checkbox'][name='classification2']").prop("checked", true);
					form ? form.render("checkbox") : null;
					return;
				} else {
					// 非全选
					$("input[type='checkbox'][name='classification2']").prop("checked", false);
					form ? form.render("checkbox") : null;
				}
			}

			layui.config({
				base: '../../layuiadmin/' //静态资源所在路径
			}).extend({
				index: 'lib/index' //主入口模块
			}).use(['index', 'form', 'element', 'table', 'laydate', 'layarea'], function() {
				var $ = layui.$,
					admin = layui.admin,
					element = layui.element,

					table = layui.table,
					laydate = layui.laydate,
					layarea = layui.layarea;
				form = layui.form;
				
				// 监听tab
				element.on('tab(custom-tab)', function(elem) {
					var index = $(this).index();
					console.log(index)
					if(index==1){
						$("#addRule-btn").hide();
					}else{
						$("#addRule-btn").show();
					}
				});

				// 展开与隐藏分类
				$(".custom-classification .classification-btn").on('click', function() {
					var value = $(this).attr("value");
					var index = $(this).parents(".custom-classification").index();
					console.log(index);
					if (value == "0") {
						// 收起
						$(this).attr("value", "1");
						$(".custom-classification:eq(" + index + ") .layui-icon-triangle-d").hide();
						$(".custom-classification:eq(" + index + ") .layui-icon-triangle-r").show();

						$(".custom-classification:eq(" + index + ") ul:eq(1)").slideUp(100);
					} else {
						// 展开
						$(this).attr("value", "0");
						$(".custom-classification:eq(" + index + ") .layui-icon-triangle-d").show();
						$(".custom-classification:eq(" + index + ") .layui-icon-triangle-r").hide();

						$(".custom-classification:eq(" + index + ") ul:eq(1)").slideDown(100);
					}
				});

				// 自定义分类全选与反选功能				
				form.on("checkbox(classification1)", function(data) {
					//是否被选中
					if (data.elem.checked) {
						$("input[type='checkbox'][name='classification1-item']").prop("checked", true);
					} else {
						$("input[type='checkbox'][name='classification1-item']").prop("checked", false);
					}
					form ? form.render("checkbox") : null;
				});

				// 自定义分类子元素勾选
				form.on("checkbox(classification1-item)", function(data) {
					isState();
				});

				// 系统分类全选与反选功能
				form.on("checkbox(classification2)", function(data) {
					//是否被选中
					if (data.elem.checked) {
						$("input[type='checkbox'][name='classification2-item']").prop("checked", true);
					} else {
						$("input[type='checkbox'][name='classification2-item']").prop("checked", false);
					}
					form ? form.render("checkbox") : null;
				});

				// 系统分类子元素勾选
				form.on("checkbox(classification2-item)", function(data) {
					isState2();
				});

				// 广告类型判断是否自营广告
				form.on("radio(advertisement)", function(data) {
					console.log(data)
					if (this.value == '0') {
						$("#advertisement-table").hide();
					} else {
						$("#advertisement-table").show();
					}
				});

				$("#shop").on('click', function() {
					$("#shop-container").toggle();
				});

				//全部表格实例
				table.render({
					elem: '#allMember',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					page: true //开启分页
						,
					limit: 5,
					cols: [
						[ //表头
							{
								type: 'checkbox',
							}, {
								field: 'username',
								title: '激励规则信息',
								templet: '#webchatMsg'
							}, {
								field: 'sex',
								title: '店铺信息',
								templet: '#memberMsg'
							}, {
								field: 'city',
								title: '规则信息',
								templet: '#registerMsg'
							}, {
								field: 'sign',
								title: '状态信息',
								templet: '#roleMsg'
							}, {
								title: '操作',
								width: 120,
								align: 'center',
								toolbar: '#memberMsgOperate'
							}
						]
					]
				});
				
				//待审核表格实例
				table.render({
					elem: '#auditing',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					page: true //开启分页
						,
					limit: 5,
					cols: [
						[ //表头
							{
								type: 'checkbox',
							}, {
								field: 'username',
								title: '激励规则信息',
								templet: '#webchatMsg2'
							}, {
								field: 'sex',
								title: '店铺信息',
								templet: '#memberMsg2'
							}, {
								field: 'city',
								title: '规则信息',
								templet: '#registerMsg2'
							}, {
								field: 'sign',
								title: '状态信息',
								templet: '#roleMsg'
							}, {
								title: '操作',
								width: 120,
								align: 'center',
								toolbar: '#memberMsgOperate2'
							}
						]
					]
				});
				
				$("#shop").on('click', function() {
					$("#shop-container").toggle();
				});
				
				//审核通过表格实例
				table.render({
					elem: '#passShop',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					page: true //开启分页
						,
					limit: 5,
					cols: [
						[ //表头
							{
								type: 'checkbox',
							}, {
								field: 'username',
								title: '激励规则信息',
								templet: '#webchatMsg3'
							}, {
								field: 'sex',
								title: '店铺信息',
								templet: '#memberMsg3'
							}, {
								field: 'city',
								title: '规则信息',
								templet: '#registerMsg3'
							}, {
								field: 'sign',
								title: '状态信息',
								templet: '#roleMsg3'
							}, {
								title: '操作',
								width: 120,
								align: 'center',
								toolbar: '#memberMsgOperate3'
							}
						]
					]
				});
				
				//所有会员表格实例
				table.render({
					elem: '#failedShop',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					page: true //开启分页
						,
					limit: 5,
					cols: [
						[ //表头
							{
								type: 'checkbox',
							}, {
								field: 'username',
								title: '激励规则信息',
								templet: '#webchatMsg4'
							}, {
								field: 'sex',
								title: '店铺信息',
								templet: '#memberMsg4'
							}, {
								field: 'city',
								title: '规则信息',
								templet: '#registerMsg4'
							}, {
								field: 'sign',
								title: '状态信息',
								templet: '#roleMsg4'
							}, {
								title: '操作',
								width: 120,
								align: 'center',
								toolbar: '#memberMsgOperate4'
							}
						]
					]
				});
				
				// 自营广告表格实例
				table.render({
					elem: '#advertisement',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					limit: 5,
					cols: [
						[ //表头
							{
								type: 'numbers',
								title: '序号',
								width: 100,
							}, {
								field: 'username',
								title: '广告名称'
							}, {
								field: 'sex',
								title: '广告位置'
							}, {
								field: 'city',
								title: '广告图片大小'
							}, {
								field: 'sign',
								title: '广告链接地址',
								edit: 'text'
							}, {
								title: '上传广告图片',
								width: 120,
								align: 'center',
								toolbar: '#uploadOperate'
							}
						]
					]
				});

				//日志表格实例
				table.render({
					elem: '#logTable',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					page: true //开启分页
						,
					cols: [
						[ //表头
							{
								type: 'numbers',
								title: '序号',
								width: 100
							}, {
								field: 'sex',
								title: '日志时间',
								width: 120
							}, {
								field: 'city',
								title: '操作人',
								width: 120
							}, {
								field: 'sign',
								title: '操作行为',
							}
						]
					]
				});
				
				// 上传
				table.on('tool(uploadOperate)', function(obj) {
					var data = obj.data;
					// console.log(data);
					if (obj.event == 'upload') {
						// 上传广告图片
					}
				});
				
				//已选店铺表格实例
				table.render({
					elem: '#shopTable',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					cols: [
						[ //表头
							{
								type: 'numbers',
								title: '序号',
							}, {
								field: 'sex',
								title: '店铺ID和名称',
							}, {
								field: 'city',
								title: '店铺机构类型',
							}
						]
					]
				});
				
				// 已选分类和商品表格实例
				table.render({
					elem: '#typeTable',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					cols: [
						[ //表头
							{
								type: 'numbers',
								title: '序号',
							}, {
								field: 'sex',
								title: '已选分类',
							}, {
								field: 'city',
								title: '分类类型',
							}, {
								field: 'city',
								title: '配置自定义分类商品类型',
							}, {
								field: 'city',
								title: '商品详情',
								align: 'center',
								toolbar: '#goodsDetails'
							}
						]
					]
				});
				
				// 广告类型：自营广告
				table.render({
					elem: '#advertisementTable',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					cols: [
						[ //表头
							{
								type: 'numbers',
								title: '序号',
							}, {
								field: 'id',
								title: '广告名称',
							}, {
								field: 'username',
								title: '广告位置',
							}, {
								field: 'sex',
								title: '广告图片大小',
							}, {
								field: 'city',
								title: '广告链接地址',
							}, {
								field: 'sign',
								title: '上传广告图片',
								width: 160,
								align: 'center',
								toolbar: '#uploadImg'
							}
						]
					]
				});
				
				// 激励类型
				table.render({
					elem: '#excitationTable',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					cols: [
						[ //表头
							{
								type: 'numbers',
								title: '序号',
								fixed: 'left'
							}, {
								field: 'id',
								title: '货品ID',
								width: 120
							}, {
								field: 'username',
								title: '商品名',
								width: 160
							}, {
								field: 'sex',
								title: '通用名',
								width: 160
							}, {
								field: 'city',
								title: '规格',
								width: 160
							}, {
								field: 'sign',
								title: '商品理论库存',
								width: 160
							}, {
								field: 'experience',
								title: '2B批发价A',
								width: 160
							}, {
								field: 'logins',
								title: '2C官方零售价B',
								width: 160
							}, {
								field: 'wealth',
								title: '推广价（默认A\B 比价取最大值）',
								width: 300,
								edit: 'text'
							}, {
								field: 'classify',
								title: '激励比例',
								width: 160,
								edit: 'text'
							}, {
								field: 'score',
								title: '激励一口价',
								width: 160,
								edit: 'text'
							}, {
								field: 'sign',
								title: '1件商品佣金预算',
								width: 200
							}
						]
					]
				});				
				
				
				// 取消按钮关闭所有弹出层
				$(".cancel-btn").on('click', function() {
					layer.closeAll();
				});

				// 商品表格
				table.render({
					elem: '#goodsTable',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					page: true //开启分页
						,
					cols: [
						[ //表头
							{
								type: 'checkbox',
								width: 80,
								fixed: 'left'
							},
							{
								type: 'numbers',
								title: '序号',
								width: 80,
								fixed: 'left'
							}, {
								field: 'id',
								title: '货品ID',
								width: 120
							}, {
								field: 'username',
								title: '商品名',
								width: 160
							}, {
								field: 'sex',
								title: '通用名',
								width: 160
							}, {
								field: 'city',
								title: '规格',
								width: 160
							}, {
								field: 'sign',
								title: '商品理论库存',
								width: 160
							}, {
								field: 'experience',
								title: '2B批发价A',
								width: 160
							}, {
								field: 'logins',
								title: '2C官方零售价B',
								width: 160
							}, {
								field: 'wealth',
								title: '推广价（默认A\B 比价取最大值）',
								width: 300,
								edit: 'text'
							}, {
								field: 'classify',
								title: '激励比例',
								width: 160,
								edit: 'text'
							}, {
								field: 'score',
								title: '激励一口价',
								width: 160,
								edit: 'text'
							}, {
								field: 'sign',
								title: '1件商品佣金预算',
								width: 200
							}
						]
					]
				});

				//全部监听工具条
				table.on('tool(allMember)', function(obj) {
					var data = obj.data;
					// console.log(data);
					switch (obj.event) {
						case 'log':
							// 日志
							layer.open({
								type: 1,
								title: '日志',
								area: '900px',
								shade: 0.8,
								id: 'LAY_log' //设定一个id，防止重复弹出
									,
								btnAlign: 'c',
								moveType: 1 //拖拽模式，0或者1
									,
								content: $("#log-box"),
								success: function(layero) {

								}
							});
							break;
						case 'effect':
							// 启用
							layer.confirm('是否启用该激励规则的所有店铺商品和广告等规则将会启动使用？', {
								title: '温馨提示',
								icon: 3,
								btn: ['确定', '取消'] //按钮
							}, function(index) {
								// 确定
								layer.close(index);
							}, function() {
								// 取消
							});
							break;
						case 'stopUse':
							// 禁用
							layer.confirm('是否停用该激励规则的所有店铺商品和广告等规则将会暂停使用？', {
								title: '温馨提示',
								icon: 3,
								btn: ['确定', '取消'] //按钮
							}, function(index) {
								// 确定
								layer.close(index);
							}, function() {
								// 取消
							});
							break;
						case 'edit':
							// 商品激励修改
							layer.open({
								type: 1,
								title: '商品激励修改',
								area: '1000px',
								shade: 0.8,
								id: 'LAY_edit' //设定一个id，防止重复弹出
									,
								btnAlign: 'c',
								moveType: 1 //拖拽模式，0或者1
									,
								content: $("#edit-box"),
								success: function(layero) {

								}
							});
							break;
						case 'editRule':
							// 编辑激励规则
							layer.open({
								type: 1,
								title: '编辑激励规则',
								area: '1000px',
								shade: 0.8,
								id: 'LAY_editRule' //设定一个id，防止重复弹出
									,
								btnAlign: 'c',
								moveType: 1 //拖拽模式，0或者1
									,
								content: $("#editRule-box"),
								success: function(layero) {

								}
							});
							break;
					}
				});
				
				//待审核监听工具条
				table.on('tool(auditing)', function(obj) {
					var data = obj.data;
					console.log(data);
					switch (obj.event) {
						case 'audit':
							// 审核
							layer.open({
								type: 1,
								title: '审核',
								area: '900px',
								shade: 0.8,
								id: 'LAY_log' //设定一个id，防止重复弹出
									,
								btnAlign: 'c',
								moveType: 1 //拖拽模式，0或者1
									,
								content: $("#auditing-box"),
								success: function(layero) {
				
								}
							});
							break;
					}
				});
				
				//审核通过监听工具条
				table.on('tool(passShop)', function(obj) {
					var data = obj.data;
					console.log(data);
					switch (obj.event) {
						case 'effect':
							// 启用
							layer.confirm('是否启用该激励规则的所有店铺商品和广告等规则将会启动使用？', {
								title: '温馨提示',
								icon: 3,
								btn: ['确定', '取消'] //按钮
							}, function(index) {
								// 确定
								layer.close(index);
							}, function() {
								// 取消
							});
							break;
						case 'stopUse':
							// 禁用
							layer.confirm('是否停用该激励规则的所有店铺商品和广告等规则将会暂停使用？', {
								title: '温馨提示',
								icon: 3,
								btn: ['确定', '取消'] //按钮
							}, function(index) {
								// 确定
								layer.close(index);
							}, function() {
								// 取消
							});
							break;
						case 'edit':
							// 商品激励修改
							layer.open({
								type: 1,
								title: '商品激励修改',
								area: '1000px',
								shade: 0.8,
								id: 'LAY_edit' //设定一个id，防止重复弹出
									,
								btnAlign: 'c',
								moveType: 1 //拖拽模式，0或者1
									,
								content: $("#edit-box"),
								success: function(layero) {
				
								}
							});
							break;
						case 'editRule':
							// 编辑激励规则
							layer.open({
								type: 1,
								title: '编辑激励规则',
								area: '1000px',
								shade: 0.8,
								id: 'LAY_editRule' //设定一个id，防止重复弹出
									,
								btnAlign: 'c',
								moveType: 1 //拖拽模式，0或者1
									,
								content: $("#editRule-box"),
								success: function(layero) {
				
								}
							});
							break;
					}
				});
				
				//审核不通过监听工具条
				table.on('tool(failedShop)', function(obj) {
					var data = obj.data;
					console.log(data);
					switch (obj.event) {
						case 'edit':
							// 商品激励修改
							layer.open({
								type: 1,
								title: '商品激励修改',
								area: '1000px',
								shade: 0.8,
								id: 'LAY_edit' //设定一个id，防止重复弹出
									,
								btnAlign: 'c',
								moveType: 1 //拖拽模式，0或者1
									,
								content: $("#edit-box"),
								success: function(layero) {
				
								}
							});
							break;
						case 'editRule':
							// 编辑激励规则
							layer.open({
								type: 1,
								title: '编辑激励规则',
								area: '1000px',
								shade: 0.8,
								id: 'LAY_editRule' //设定一个id，防止重复弹出
									,
								btnAlign: 'c',
								moveType: 1 //拖拽模式，0或者1
									,
								content: $("#editRule-box"),
								success: function(layero) {
				
								}
							});
							break;
					}
				});

				// 新增激励规则
				$("#addRule-btn").on('click', function() {
					layer.open({
						type: 1,
						title: '新增激励规则',
						area: '1000px',
						shade: 0.8,
						id: 'LAY_editRule' //设定一个id，防止重复弹出
							,
						btnAlign: 'c',
						moveType: 1 //拖拽模式，0或者1
							,
						content: $("#editRule-box"),
						success: function(layero) {

						}
					});
				});

				// 时间插件
				laydate.render({
					elem: '#startTime'
				});

				laydate.render({
					elem: '#endTime'
				});

				// 取消按钮关闭弹窗
				$(".closeIndex-btn").on('click', function() {
					layer.close(layer.index);
				});


				// 批量设置激励比例
				$(".btn_scale").on('click', function() {
					layer.open({
						type: 1,
						title: '批量设置激励比例',
						area: '400px',
						shade: 0.8,
						id: 'LAY_scale' //设定一个id，防止重复弹出
							,
						btnAlign: 'c',
						moveType: 1 //拖拽模式，0或者1
							,
						content: $("#scale-box"),
						success: function(layero) {

						}
					});
				});

				// 批量设置激励一口价
				$(".btn_price").on('click', function() {
					layer.open({
						type: 1,
						title: '批量设置激励比例',
						area: '400px',
						shade: 0.8,
						id: 'LAY_price' //设定一个id，防止重复弹出
							,
						btnAlign: 'c',
						moveType: 1 //拖拽模式，0或者1
							,
						content: $("#price-box"),
						success: function(layero) {

						}
					});
				});

				// 批量删除
				$(".btn_delect").on('click', function() {
					layer.confirm('是否批量删除商品？', {
						title: '温馨提示',
						icon: 3,
						btn: ['确定', '取消'] //按钮
					}, function(index) {
						// 确定
						layer.close(index);
					}, function() {
						// 取消
					});
				});
			});
		</script>
	</body>
</html>
